#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

void find_singledog(int arr[], int sz, int single[])
{

	int ret = 0;
	
	for (int i = 0; i < sz; i++)
	{
		ret ^= arr[i];
	}

	int pos = 0;

	for (int i = 0; i < 32; i++)
	{
		if (((ret >> i) & 1) == 1)
		{
			pos = i;
			break;
		}

	}

	for (int i = 0; i < sz; i++)
	{
		if (((arr[i] >> pos) & 1) == 1)
		{
			single[0] ^= arr[i];
		}
		else
		{
			single[1] ^= arr[i];
		}
		

	}




}

int main()
{
	int arr[] = { 1,2,3,4,5,6,2,3,4,5, };
	int sz = sizeof(arr) / sizeof(arr[0]);
	int single[2] = { 0 };
	find_singledog(arr, sz, single);
	printf("%d %d", single[0], single[1]);




	return 0;
}